<?php

if(!isset($_GET['email'] || !isset($_GET['authcode'])) 
	die("Must access this document with email and authcode.");

$email=$_GET['email'];
$authcode=$_GET['authcode'];
// validate auth code
$validAuthCode='caca'+$email;
if($authocode!=$validAuthCode) die("Invalid authcode.");

// get list of tickets and create links to viewTicket.php with authcodes
require_once 'db_config.php';
$db=new mysqli(DB_HOST,DB_USER,DB_PASSWORD,DB_DATABASE);

// get open tickets
// get closed tickets
// get archived tickets

$query="SELECT ticket_id, state, CONCAT(SUBSTR(message,0,100),'...'),handler,type FROM ticket_state
	WHERE creator=$email
		AND 


require_once 'myTickets.tpl.php';
?>
